<template>
  <div>
    <h1>我是异步组件</h1>
    {{ list[diagram.data] }}
  </div>
</template>
<script lang="ts">
import { defineComponent, reactive, toRefs } from "vue";
import { article } from "@/api/index";
export default defineComponent({
  async setup() {
    const state = reactive({
      list: { age: 123 },
      diagram: { data: "age" },
    });
    let data = await article();
    console.log("我是异步组件");
    return { ...toRefs(state) };
  },
});
</script>
